#include "AS5600.h"

float ReadAS5600Angle(AS5600_Struct * pAS5600)
{
	float degress =0;
	uint16_t retVal = 0;
	retVal = pAS5600->IICRead(I2C_ADDRESS,RAW_ANGLE_HI);
	retVal = retVal & 0x0fff;
	degress = (float)retVal*360/4095 - pAS5600->angleOffect;
	if (degress < 0) 
		{
			degress = degress + 360.0f;
		}
		return degress;
}



